import Vue from 'vue'
import VueRouter from 'vue-router'

import LoginIndex from '@/views/LoginIndex'
import LoyOut from '@/views/LoyOut'
import FindHome from '@/views/FindHome'
import messagetime from '@/views/MessageTime'
import ShouYe from '@/views/ShouYe'
import MyDe from '@/views/MyDe'
import ShouCang from '@/views/ShouCang'
import ChuZu from '@/components/ChuZu'
import CityList from '@/views/CityList'
import GoChuzu from '@/views/GoChuzu'

Vue.use(VueRouter)

const routes = [
  { path: '/login', component: LoginIndex },
  {
    path: '/',
    component: LoyOut,
    children: [
      { path: '/findhome', component: FindHome },
      { path: '/messagetime', component: messagetime },
      { path: '/loyout', component: LoyOut },
      { path: '/shouye', component: ShouYe },
      { path: '/my', component: MyDe }
    ]
  },

  { path: '/messagetime', component: messagetime },
  { path: '/shoucang', component: ShouCang },
  { path: '/chuzu', component: ChuZu },
  { path: '/citylist', component: CityList },
  { path: '/gochuzu', component: GoChuzu }
]

const router = new VueRouter({
  routes
})

export default router
